package com.example.cloud.model.statistics;

import com.example.cloud.model.common.CommonModel;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import java.math.BigDecimal;

/**
 * Created by wt on 2019/1/5.
 * 财务统计
 */
@Entity(name = "statistics_financial")
@Data
@EqualsAndHashCode(callSuper = false)
public class StatisticsFinancial extends CommonModel {
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Long id;
    // 预约医生
    @Column(name = "user_id")
    private Long userId;
    // 医生姓名
    @Column(name = "user_name")
    private String userName;
    // 新诊人数
    @Column(name = "new_number", columnDefinition = "INT DEFAULT 0")
    private int newNumber;
    // 新诊疗程成交人次
    @Column(name = "new_course_transaction", columnDefinition = "INT DEFAULT 0")
    private int newCourseTransaction;
    // 新诊疗程成交金额
    @Column(name = "new_course_amount", columnDefinition = "decimal default 0.0", precision = 12, scale = 2)
    private BigDecimal newCourseAmount;
    // 新诊单次成交人次
    @Column(name = "new_single_transaction", columnDefinition = "INT DEFAULT 0")
    private int newSingleTransaction;
    // 新诊单次成交金额
    @Column(name = "new_single_amount", columnDefinition = "decimal default 0.0", precision = 12, scale = 2)
    private BigDecimal newSingleAmount;
    // 新诊缴费总金额
    @Column(name = "new_pay_total_amount", columnDefinition = "decimal default 0.0", precision = 12, scale = 2)
    private BigDecimal newPayTotalAmount;
    // 复诊单次再消费人次
    @Column(name = "review_single_transaction", columnDefinition = "INT DEFAULT 0")
    private int reviewSingleTransaction;
    // 复诊单次再消费金额
    @Column(name = "review_single_reamount", columnDefinition = "decimal default 0.0", precision = 12, scale = 2)
    private BigDecimal reviewSingleReamount;
    // 复诊续疗程人次
    @Column(name = "review_renewal_course_transaction", columnDefinition = "INT DEFAULT 0")
    private int reviewRenewalCourseTransaction;
    // 复诊续疗程金额
    @Column(name = "review_renewal_course_amount", columnDefinition = "decimal default 0.0", precision = 12, scale = 2)
    private BigDecimal reviewRenewalCourseAmount;
    // 治疗人次
    @Column(name = "treat_transaction", columnDefinition = "INT DEFAULT 0")
    private int treatTransaction;
    // 划扣收入
    @Column(name = "deduct_amount", columnDefinition = "decimal default 0.0", precision = 12, scale = 2)
    private BigDecimal deductAmount;
    // 账户编号
    @Column(name = "account_id")
    private Long accountId;
    // 组织机构编号
    @Column(name = "organ_id")
    private Long organId;
    // 组织机构名称
    @Column(name = "organ_name")
    private String organName;
}
